elimination method for solving linear systems